/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.ec.warpper;

import cn.iot.card.open.constants.factory.ConstantFactory;
import cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper;
import cn.stylefeng.roses.kernel.model.page.PageResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
 * 集团短信白名单包装类
 *
 * @author 何光鑫
 * @date 20200114 10:53:21
 * @modify 20200114 何光鑫 v1.0 创建
 * @since v1.0
 */
public class EcGroupOfferingsWrapper extends BaseControllerWrapper {

    public EcGroupOfferingsWrapper(Map<String, Object> single) {
        super(single);
    }

    public EcGroupOfferingsWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    public EcGroupOfferingsWrapper(Page<Map<String, Object>> page) {
        super(page);
    }

    public EcGroupOfferingsWrapper(PageResult<Map<String, Object>> pageResult) {
        super(pageResult);
    }

    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        map.put("offeringTypeName", ConstantFactory.me().getGroupOfferingTypeNameName((String) map.get("offeringType")));
        map.put("paymentModeName", ConstantFactory.me().getGroupPaymentModeName((String) map.get("paymentMode")));
    }
}
